// 住户信息类型定义
export interface Resident {
  id: number
  userId?: number
  realName: string
  identityType?: number
  identityNo?: string
  gender?: number
  birthday?: string
  phone?: string
  email?: string
  address?: string
  education?: string
  profession?: string
  workUnit?: string
  nationality?: string
  nativePlace?: string
  emergencyContact?: string
  emergencyPhone?: string
  maritalStatus?: number
  avatar?: string
  vehicleInfo?: string
  petInfo?: string
  specialNeeds?: string
  images?: string
  status: number
  deleted: number
  createTime: string
  updateTime: string
  createBy?: number
  updateBy?: number
}

// 住户房户关联类型定义
export interface ResidentHousehold {
  id: number
  residentId: number
  householdId: number
  residentType: number
  moveInDate?: string
  moveOutDate?: string
  contractStartDate?: string
  contractEndDate?: string
  monthlyRent?: number
  deposit?: number
  contractNo?: string
  applyStatus: number
  applyTime?: string
  approveTime?: string
  approveBy?: number
  approveRemark?: string
  status: number
  remark?: string
  deleted: number
  createTime: string
  updateTime: string
  createBy?: number
  updateBy?: number
}

// 住户房户关联VO
export interface ResidentHouseholdVO {
  id: number
  residentId: number
  householdId: number
  realName: string
  phone?: string
  identityNo?: string
  gender?: number
  birthday?: string
  residentType: number
  residentTypeName: string
  moveInDate?: string
  moveOutDate?: string
  contractStartDate?: string
  contractEndDate?: string
  monthlyRent?: number
  deposit?: number
  contractNo?: string
  applyStatus: number
  applyStatusName: string
  status: number
  statusName: string
  remark?: string
  createTime: string
  updateTime: string
  
  // 新增字段：社区、楼栋、单元、房户信息
  communityId?: number
  communityName?: string
  buildingId?: number
  buildingName?: string
  unitId?: number
  unitName?: string
  roomNumber?: string
}

// 新增住户到房户DTO
export interface ResidentHouseholdAddDTO {
  residentId: number
  residentType: number
  moveInDate?: string
  moveOutDate?: string
  contractStartDate?: string
  contractEndDate?: string
  monthlyRent?: number
  deposit?: number
  contractNo?: string
  remark?: string
}

// 更新住户房户关联DTO
export interface ResidentHouseholdUpdateDTO {
  residentType?: number
  moveInDate?: string
  moveOutDate?: string
  contractStartDate?: string
  contractEndDate?: string
  monthlyRent?: number
  deposit?: number
  contractNo?: string
  remark?: string
}

// 住户申请审核DTO
export interface ResidentHouseholdApproveDTO {
  applyStatus: number
  approveRemark?: string
}

// 查询参数DTO
export interface ResidentHouseholdQueryDTO {
  householdId?: number
  realName?: string
  residentType?: number
  status?: number
  current?: number
  size?: number
}

// 分页结果类型
export interface PageResult<T> {
  records: T[]
  total: number
  current: number
  size: number
  pages: number
}

// API响应类型
export interface ApiResponse<T = any> {
  code: number
  message: string
  data: T
  timestamp?: number
  requestId?: string
} 